/**
 * @Author wangyl
 * @E-mail wangyl@dsgdata.com
 **/
package com.wyl.xue.admin.system.mybatis.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyl.xue.admin.system.mybatis.entity.SystemUserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName: SystemUserRoleMapper
 * @Function: 角色部门关联信息Mapper
 * @Date: 2019/12/18 0:44
 * @author wangyl
 * @version V1.0
 */
public interface SystemUserRoleMapper extends BaseMapper<SystemUserRole> {
    /**
     * @Description 通过角色id彻底删除关联
     * @param roledId
     * @return void
     * @Date 2020/11/10 16:20
     * @Author wangyl
     * @Version V1.0
     */
    @Select("DELETE FROM system_role_menu WHERE role_id=#{roledId}")
    void deleteUserRoleByroleId(@Param("roleId") long roledId);

    /**
     * @Description 通过用户id彻底删除关联
     * @param userId
     * @return void
     * @Date 2020/11/10 16:41
     * @Author wangyl
     * @Version V1.0
     */
    @Select("DELETE FROM system_user_role WHERE user_id=#{userId}")
    void deleteUserRoleByUserId(@Param("userId") long userId);
}
